import Drap from "../pages/Drag";
import Store from "../pages/Store";
import ReactEvent from '../pages/React17Prac'
import React17Proxy from '../pages/React17Proxy'
import HooksTest from './../pages/HooksTest/index';
import {lazy} from 'react'
interface router {
  path: string;
  name: string;
  element: any;
  children?: Array<router>;
}

const routers: Array<router> = [
  {
    path: "store",
    // element: lazyLoad(() => import('/../pages/Store')),
    element: Store(),
    name: "redux训练",
  },
  {
    path: "drag",
    name: "拖拽",
    element: Drap(),
    // element: lazyLoad(() => import('./../pages/Drag')),
  },
  {
    path: "event",
    name: "React17事件机制",
    element: <ReactEvent />,
  },
  {
    path: "eventProxy",
    name: "React17事件代理",
    element: <React17Proxy />,
  },
  {
    path: "hooks",
    name: "useState测试",
    element: <HooksTest />,
  },
];
export default routers;
